import axios from 'axios'

export const increment = (counter) => ({type: "INCREMENT", counter})
export const decreament = counter => ({type: "DECREMENT", counter})

export const fetchHomeData = () => {
  return async (dispatch) => {
    let res = await axios("http://codercba.com:1888/airbnb/api/home/goodprice")
    const goods = res.data.list
    dispatch({type: "FETCH_HOME_DATA",goods})
  }
}